package com.ysq.track;

import com.ysq.track.view.cmd.CommandInputView;
import com.ysq.track.view.panel.MainFrame;

import javax.swing.*;

public class AppStart {

    public static void runCmd(){
        try {
            CommandInputView view = new CommandInputView();

            view.processInput();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    public static void runFrame(){
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                try {
                    MainFrame mf = new MainFrame();

                    mf.initFrame();
                    mf.showFrame();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    public static void main(String[] args) {

        runFrame();

        System.out.println("finished ... ");
    }
}
